<div>
<?php //print_r($this->events)?>
<div>
	
	
	<?php if($this->event->status == 'opened'): ?>
		<h1><?php echo $this->event->title; ?></h1>
		<a href="<?php echo $this->url(array('controller' => 'bet', 'id' => $this->event->id), 'def', true);?>">BET!</a>
	<?php else:?>
		<h1>
			<?php echo $this->event->getTeamL()->title; ?>
				<?php echo $this->event->score_left; ?>
				 : 
				<?php echo $this->event->score_right; ?>
			<?php echo $this->event->getTeamR()->title; ?>
		</h1>
	<?php endif; ?>
	<div id="description">Start at: <?php echo $this->event->date_start; ?></div>
	<?php if(!empty($this->latest_bets)):?>
	<div id="latest_bets">
		<h4>Latest bets:</h4>
		<?php //print_r($this->latest_bets)?>
		<?php foreach($this->latest_bets as $bet):?>
		<a href="#"><?php echo $bet['name']; ?></a>
		<?php echo $bet['bet']->bet_left; ?> : <?php echo $bet['bet']->bet_right; ?>
		<br />
		<?php endforeach;?>
	</div>
	<?php endif; ?>
</div>
</div>
